package design.pattern.策略模式;

/**
 * 打折收费子类
 */
public class CashRebate implements  CashSuper{

    //具体的折扣
    private double moneyRebate;

    CashRebate(double moneyRebate){
        this.moneyRebate = moneyRebate;
    }

    @Override
    public double acceptCash(double money) {
        return money * moneyRebate;
    }
}
